package hu.arguscab.game;

import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

import hu.arguscab.graphic.Drawable;
import hu.arguscab.graphic.Line;

public class QuadTreeRepresentation<E, N> implements Drawable {
	
	private List<Line> lines = new ArrayList<Line>();
	
	@Override
	public void draw() {
		for ( Line line : lines )
			line.draw();
	}

	public void addLine(int x1, int y1, int x2, int y2, int depth) {
		Line l = new Line(x1, y1, x2, y2);
		l.setLineWidth(10.0f/depth);
		//l.setColor(Color.red);
		if ( depth == -1 ) // A* graf
			l.setColor(Color.blue);
		else
			l.setColor(0, 1.0f/depth, 0.5f/depth);
		lines.add( l );
	}
}
